#include <iostream>
#include "interpolation_polynomial.h"
#include <vector>
#include <cmath>
using namespace std;

int main()
{
  vector<double> x ;
  vector<double> y ;
  int n = 10;
  for(int i = 0;i < n;i++)
    {
      x.push_back(cos( M_PI * 1.0 * ( 2.0 * i + 1.0) / (2 * n) ));
      y.push_back(1.0 / (1.0 + 25.0 * x[i] * x[i] ));
    }
  Newton_formula p(x,y);
  vector<vector<double>> f = p.getf();
  for(int i = 0; i < x.size();i++)
    {
      cout<< f[i][i]<< " ";
      cout<< endl;
    }
      cout<< endl;
  return 0;
}
